feat(status): surface full sdkKeys[]/mobileKeys[] arrays on /status#731
Merged
aaron-zeisler merged 1 commit intoJun 30, 2026
Merged
Conversation
06b94b2 to
f063227
Compare
39df6fe to
9b4302f
Compare
This was referenced Jun 29, 2026
keelerm84
approved these changes
Jun 30, 2026
f063227 to
0635b12
Compare
9b4302f to
ef93f46
Compare
0635b12 to
306ea66
Compare
ef93f46 to
016dc3e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 016dc3e. Configure here.
306ea66 to
0ef2308
Compare
016dc3e to
3316745
Compare
keelerm84
approved these changes
Jun 30, 2026
0ef2308 to
f4e6263
Compare
Base automatically changed from
aaronz/SDK-2534/rotator-accepted-keys
to
feat/concurrent-keys
June 30, 2026 20:25
Add a KeyStatus representation and sdkKeys[]/mobileKeys[] arrays to EnvironmentStatusRep. The handler takes a single consistent snapshot via GetAcceptedKeys() and drives every credential field from it — the scalar anchor/primary designations, the full arrays (grouped by kind, always present), and expiringSdkKey — so they cannot drift relative to each other under a concurrent reconcile (previously the anchor was read separately from the key set). Each entry carries the obscured value, the optional wire identifier, and an optional Unix-millisecond expiry. expiringSdkKey is the soonest-expiring non-anchor SDK key, with a (expiry, value) tie-break so the pick is deterministic when several keys share an expiry.
3316745 to
449ca7d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Note
Stacked PR — splitting #724 (final PR):
fix(envfactory): reject primary mobile key absent from mobileKeys[] #728 — reject primary mobile key absent from✅ mergedmobileKeys[]refactor(credential): carry wire key identifiers through the accepted set #729 — carry wire key identifiers through the accepted set✅ mergedfeat(credential): expose the full accepted key set via AcceptedKeys #730 — expose the full accepted key set via✅ mergedAcceptedKeyssdkKeys[]/mobileKeys[]on/statusBase:
feat/concurrent-keys. Last PR of the stack.Summary
Surface the full accepted credential set on
/statusassdkKeys[]/mobileKeys[]arrays — each entry carrying the obscured value, the optional wire identifier, and an optional Unix-millisecond expiry. The existing scalarsdkKey/mobileKeyfields are preserved and now designate which array entry is the anchor / primary.expiringSdkKeyis now computed deterministically from the accepted set: the previous code overwrote on each loop iteration (arbitrary with multiple expiring keys); it now reports the soonest-expiring non-anchor key, with a(expiry, value)tie-break.Jira: SDK-2534
Background
The concurrent-keys epic (SDK-2453) lets an environment accept multiple SDK keys and mobile keys at once. Per the backend tech spec and RAC payload spec, the
sdkKeys/mobileKeysarrays are the authoritative full accepted set, including the default/anchor key (also duplicated on the legacy scalar fields). The status endpoint mirrors that: the arrays carry every accepted key; the scalars designate the anchor / primary.The wire format carries a non-secret
keyidentifier alongside each credential'svalue(threaded through the model in #729 and exposed viaAcceptedKeys()in #730). The identifier is genuinely optional — manual configuration and old-format (pre-concurrent-keys) payloads carry none — so it is modeled as a pointer and omitted from the JSON when absent.Response schema
EnvironmentStatusRepgains two arrays plus aKeyStatuselement type. The scalar fields are unchanged.Array entry order is unspecified. The arrays are always present (never null):
sdkKeysalways contains at least the anchor;mobileKeysis empty for an environment with no mobile key (e.g. server-side only).Example (environment mid-rotation: an extra service key + an expiring key)
Changes
KeyStatusand thesdkKeys[]/mobileKeys[]fields toEnvironmentStatusRep.GetAcceptedKeys()snapshot and drives every credential field from it — the scalar anchor/primary designations, the arrays (one perServer/Mobilegroup, always present), andexpiringSdkKey. Because the anchor designation comes from the same snapshot as the key set, the two can't drift under a concurrent reconcile (previously the anchor was read separately).expiringSdkKeyis the soonest-expiring non-anchor SDK key viaslices.MinFunc, comparing(expiry, value)so the pick is deterministic on a tie.